The present invention relates to accessing data in a network environment, such as the Internet, via a computer system. In particular, the present invention relates to a system and method for selecting a host by selecting a best round trip time between a server and a client.
With the growing popularity of the Internet, providing speedy access to a requested location on the Internet is fast becoming a significant issue. For example, when a popular web page is hosted by a single computer, the Internet traffic to that computer can be overwhelming. To manage this problem, several computers can be utilized to host the same web page such that each hosting computer, typically referred to as a server, maintains a copy of the web page. If there are many servers at the same location, then the network connection to that location can become choked during a time of high Internet traffic. To avoid choking the network connection, mirrored servers are often located at different sites. These sites are herein referred to as mirrored sites. The use of multiple computers to host a network service, such as a web page, is typically referred to as mirrored services.
FIG. 1 is a block diagram illustrating a path taken by a client""s request for a particular address. A client may be any entity which attempts to access a service. For example, the client may be a user, company, or an automated computer system. FIG. 1 shows a client 10 requesting an address for a network site, such as www.cisco.com, from a local domain name server 12. The client""s local domain name server 12 may be a service such as Netcom or ATandT. The local domain name server 12 then eventually learns the address of one of the mirrored services 14A-14B, and replies to the client 10 with the address of one of the mirrored services 14A-14B.
FIG. 2 illustrates a basic organization of the Internet. The Internet includes groups of networks and routers which combine to create an autonomous system (AS) 50A-50E. A client may be located in one AS, such as AS 50A, while the service which the client is attempting to access may be located in another AS, such as AS 50E. In order to reach service 14, the request from client 10 may be passed from AS 50A to AS 50B through AS 50C, through AS 50D, and finally reaching service 14 at AS 50E.
In a mirrored service environment, the client 10 may be in one AS, such as AS 50A, while the mirrored services may be located in various different autonomous systems, such as AS 50E and AS 50C. An address of one of these mirrored services is typically needed in response to the client""s request.
There are several conventional ways of determining which mirrored service should be assigned to a requesting client. A selection of a mirrored service can be based on several factors. Ideally, the requested address should be returned to the client very quickly and download into the client""s computer system as quickly as possible. The time between the request being sent out by the client and the address being received is referred to as latency. The time it takes to download the requested data is typically determined by the band width.
One conventional service assignment scheme is a load balancing named (LB named) system scheme. In this scheme, it is determined how many clients are being served by each mirrored services. A new client is routed to the mirrored service with the least load. The load is determined by the number of clients accessing the service at a given time and the power of the server. A possible problem with the LB named scheme is that although it factors load balancing, the scheme is indifferent to the location of the client. The location of the client is typically a factor in determining latency. If the user is very far from the assigned service, then it will typically take longer to access that service than if the user was very close to the service. Accordingly it is preferred to assign the mirrored service closest to the client""s location.
Another conventional service assignment scheme is the round robin scheme. The round robin simply takes turns on which mirrored service is to be used. A potential problem with the round robin scheme is that it does not take into consideration the various loads of the mirrored services at any given time. Additionally, the round robin scheme also fails to take into consideration the location of the user. Accordingly, the two factors of latency and band width are not typically considered in the round robin scheme.
When the service is a mirrored service, the mirrored services may be located in different autonomous systems. Some service selection methods attempt to measure the metric between the client 10 and each of the services 14. Metric is used herein to include a measurement of a unit which indicates distance or time. For example, one such method measures xe2x80x9chop countxe2x80x9d, wherein the number of autonomous systems located between client 10 and service 14 are counted. The mirrored service with the smallest hop count is considered the best selection for that particular client.
Although the metric measurement methods are effective in many situations, there may be situations in which it is an advantage to have an alternate method for determining which mirrored service is best for a particular client. For example, one such situation is if the hop count between a client and a first server is the same as the hop count between the client and a second server. Although the hop count may be the same, the actual distances between the client and the first service and the client and the second service may be different. Another example of when an alternative method would be beneficial, is when an autonomous system is so large as to encompass more than one mirrored service. A client within that same autonomous system would not be able to use the hop count in order to determine which mirrored service is better for that client.
It would be desirable to have an alternative reliable method to determine which mirrored service is the best selection for a given client. The present invention addresses such a need.
An embodiment of the present invention is a system and method for measuring round trip times in a network, such as the Internet, by utilizing a packet, such as a transmission control protocol (TCP) packet. The TCP packet may be a packet which is typically utilized during establishment of a reliable connection, such as a SYN or a SYN ACK. According to an embodiment of the present invention, a mirrored service is selected for a client by sending the TCP packet from an approximate location of each of the mirrored service to an approximate location of the client. A response is then received by each mirrored service from the approximate location of the client, and a round trip time for each mirrored service is measured from the time the TCP packet was sent to the time the response was received. The various round trip times of each mirrored service are compared with each other and a best round trip time, such as the shortest time, is selected. A mirrored service associated with the best round trip time is selected for use with the client.
A method according to an embodiment of the present invention for measuring round trip time in a network is presented. The method comprises sending a packet at a first time to an approximate location of a client, wherein the packet is of a type which may be used to establish a reliable connection; receiving a reply to the packet at a second time; and measuring a round trip time from the first time to the second time.
In another aspect of the invention, a system according to an embodiment of the present invention for measuring round trip time in a network is presented. The system comprises a means for sending a packet at a first time to an approximate location of a client, wherein the packet is of a type which may be used to establish a reliable connection; a means for receiving a reply to the packet at a second time; and a means for measuring a round trip time from the first time to the second time.
In yet another aspect of the invention, a system according to an embodiment of the present invention for measuring a round trip time in a network is disclosed. The system comprises a directing device configured to receive a plurality of round trip times and select a best round trip time. The system also comprising an agent device coupled to the directing device, the agent device being configured to derive a first round trip time by utilizing a packet, wherein the packet is of a type which may be used to establish a reliable connection, the agent also being configured to send the first round trip time to the directing device.